{"ast":null,"code":"import _extends from \"@babel/runtime/helpers/extends\";\nimport _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nimport _slicedToArray from \"@babel/runtime/helpers/slicedToArray\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"prefixCls\", \"className\", \"checked\", \"defaultChecked\", \"disabled\", \"loadingIcon\", \"checkedChildren\", \"unCheckedChildren\", \"onClick\", \"onChange\", \"onKeyDown\"];\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport useMergedState from \"rc-util/es/hooks/useMergedState\";\nimport KeyCode from \"rc-util/es/KeyCode\";\nvar Switch = /*#__PURE__*/React.forwardRef(function (_ref, ref) {\n  var _classNames;\n  var _ref$prefixCls = _ref.prefixCls,\n    prefixCls = _ref$prefixCls === void 0 ? 'rc-switch' : _ref$prefixCls,\n    className = _ref.className,\n    checked = _ref.checked,\n    defaultChecked = _ref.defaultChecked,\n    disabled = _ref.disabled,\n    loadingIcon = _ref.loadingIcon,\n    checkedChildren = _ref.checkedChildren,\n    unCheckedChildren = _ref.unCheckedChildren,\n    onClick = _ref.onClick,\n    onChange = _ref.onChange,\n    onKeyDown = _ref.onKeyDown,\n    restProps = _objectWithoutProperties(_ref, _excluded);\n  var _useMergedState = useMergedState(false, {\n      value: checked,\n      defaultValue: defaultChecked\n    }),\n    _useMergedState2 = _slicedToArray(_useMergedState, 2),\n    innerChecked = _useMergedState2[0],\n    setInnerChecked = _useMergedState2[1];\n  function triggerChange(newChecked, event) {\n    var mergedChecked = innerChecked;\n    if (!disabled) {\n      mergedChecked = newChecked;\n      setInnerChecked(mergedChecked);\n      onChange === null || onChange === void 0 ? void 0 : onChange(mergedChecked, event);\n    }\n    return mergedChecked;\n  }\n  function onInternalKeyDown(e) {\n    if (e.which === KeyCode.LEFT) {\n      triggerChange(false, e);\n    } else if (e.which === KeyCode.RIGHT) {\n      triggerChange(true, e);\n    }\n    onKeyDown === null || onKeyDown === void 0 ? void 0 : onKeyDown(e);\n  }\n  function onInternalClick(e) {\n    var ret = triggerChange(!innerChecked, e); // [Legacy] trigger onClick with value\n\n    onClick === null || onClick === void 0 ? void 0 : onClick(ret, e);\n  }\n  var switchClassName = classNames(prefixCls, className, (_classNames = {}, _defineProperty(_classNames, \"\".concat(prefixCls, \"-checked\"), innerChecked), _defineProperty(_classNames, \"\".concat(prefixCls, \"-disabled\"), disabled), _classNames));\n  return /*#__PURE__*/React.createElement(\"button\", _extends({}, restProps, {\n    type: \"button\",\n    role: \"switch\",\n    \"aria-checked\": innerChecked,\n    disabled: disabled,\n    className: switchClassName,\n    ref: ref,\n    onKeyDown: onInternalKeyDown,\n    onClick: onInternalClick\n  }), loadingIcon, /*#__PURE__*/React.createElement(\"span\", {\n    className: \"\".concat(prefixCls, \"-inner\")\n  }, /*#__PURE__*/React.createElement(\"span\", {\n    className: \"\".concat(prefixCls, \"-inner-checked\")\n  }, checkedChildren), /*#__PURE__*/React.createElement(\"span\", {\n    className: \"\".concat(prefixCls, \"-inner-unchecked\")\n  }, unCheckedChildren)));\n});\nSwitch.displayName = 'Switch';\nexport default Switch;","map":{"version":3,"names":["_extends","_defineProperty","_slicedToArray","_objectWithoutProperties","_excluded","React","classNames","useMergedState","KeyCode","Switch","forwardRef","_ref","ref","_classNames","_ref$prefixCls","prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown","restProps","_useMergedState","value","defaultValue","_useMergedState2","innerChecked","setInnerChecked","triggerChange","newChecked","event","mergedChecked","onInternalKeyDown","e","which","LEFT","RIGHT","onInternalClick","ret","switchClassName","concat","createElement","type","role","displayName"],"sources":["/data/messenger.client/node_modules/rc-switch/es/index.js"],"sourcesContent":["import _extends from \"@babel/runtime/helpers/extends\";\nimport _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nimport _slicedToArray from \"@babel/runtime/helpers/slicedToArray\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"prefixCls\", \"className\", \"checked\", \"defaultChecked\", \"disabled\", \"loadingIcon\", \"checkedChildren\", \"unCheckedChildren\", \"onClick\", \"onChange\", \"onKeyDown\"];\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport useMergedState from \"rc-util/es/hooks/useMergedState\";\nimport KeyCode from \"rc-util/es/KeyCode\";\nvar Switch = /*#__PURE__*/React.forwardRef(function (_ref, ref) {\n  var _classNames;\n\n  var _ref$prefixCls = _ref.prefixCls,\n      prefixCls = _ref$prefixCls === void 0 ? 'rc-switch' : _ref$prefixCls,\n      className = _ref.className,\n      checked = _ref.checked,\n      defaultChecked = _ref.defaultChecked,\n      disabled = _ref.disabled,\n      loadingIcon = _ref.loadingIcon,\n      checkedChildren = _ref.checkedChildren,\n      unCheckedChildren = _ref.unCheckedChildren,\n      onClick = _ref.onClick,\n      onChange = _ref.onChange,\n      onKeyDown = _ref.onKeyDown,\n      restProps = _objectWithoutProperties(_ref, _excluded);\n\n  var _useMergedState = useMergedState(false, {\n    value: checked,\n    defaultValue: defaultChecked\n  }),\n      _useMergedState2 = _slicedToArray(_useMergedState, 2),\n      innerChecked = _useMergedState2[0],\n      setInnerChecked = _useMergedState2[1];\n\n  function triggerChange(newChecked, event) {\n    var mergedChecked = innerChecked;\n\n    if (!disabled) {\n      mergedChecked = newChecked;\n      setInnerChecked(mergedChecked);\n      onChange === null || onChange === void 0 ? void 0 : onChange(mergedChecked, event);\n    }\n\n    return mergedChecked;\n  }\n\n  function onInternalKeyDown(e) {\n    if (e.which === KeyCode.LEFT) {\n      triggerChange(false, e);\n    } else if (e.which === KeyCode.RIGHT) {\n      triggerChange(true, e);\n    }\n\n    onKeyDown === null || onKeyDown === void 0 ? void 0 : onKeyDown(e);\n  }\n\n  function onInternalClick(e) {\n    var ret = triggerChange(!innerChecked, e); // [Legacy] trigger onClick with value\n\n    onClick === null || onClick === void 0 ? void 0 : onClick(ret, e);\n  }\n\n  var switchClassName = classNames(prefixCls, className, (_classNames = {}, _defineProperty(_classNames, \"\".concat(prefixCls, \"-checked\"), innerChecked), _defineProperty(_classNames, \"\".concat(prefixCls, \"-disabled\"), disabled), _classNames));\n  return /*#__PURE__*/React.createElement(\"button\", _extends({}, restProps, {\n    type: \"button\",\n    role: \"switch\",\n    \"aria-checked\": innerChecked,\n    disabled: disabled,\n    className: switchClassName,\n    ref: ref,\n    onKeyDown: onInternalKeyDown,\n    onClick: onInternalClick\n  }), loadingIcon, /*#__PURE__*/React.createElement(\"span\", {\n    className: \"\".concat(prefixCls, \"-inner\")\n  }, /*#__PURE__*/React.createElement(\"span\", {\n    className: \"\".concat(prefixCls, \"-inner-checked\")\n  }, checkedChildren), /*#__PURE__*/React.createElement(\"span\", {\n    className: \"\".concat(prefixCls, \"-inner-unchecked\")\n  }, unCheckedChildren)));\n});\nSwitch.displayName = 'Switch';\nexport default Switch;"],"mappings":"AAAA,OAAOA,QAAQ,MAAM,gCAAgC;AACrD,OAAOC,eAAe,MAAM,uCAAuC;AACnE,OAAOC,cAAc,MAAM,sCAAsC;AACjE,OAAOC,wBAAwB,MAAM,gDAAgD;AACrF,IAAIC,SAAS,GAAG,CAAC,WAAW,EAAE,WAAW,EAAE,SAAS,EAAE,gBAAgB,EAAE,UAAU,EAAE,aAAa,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,SAAS,EAAE,UAAU,EAAE,WAAW,CAAC;AAC9K,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,OAAOC,UAAU,MAAM,YAAY;AACnC,OAAOC,cAAc,MAAM,iCAAiC;AAC5D,OAAOC,OAAO,MAAM,oBAAoB;AACxC,IAAIC,MAAM,GAAG,aAAaJ,KAAK,CAACK,UAAU,CAAC,UAAUC,IAAI,EAAEC,GAAG,EAAE;EAC9D,IAAIC,WAAW;EAEf,IAAIC,cAAc,GAAGH,IAAI,CAACI,SAAS;IAC/BA,SAAS,GAAGD,cAAc,KAAK,KAAK,CAAC,GAAG,WAAW,GAAGA,cAAc;IACpEE,SAAS,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